package xyz.luxiaoxiang.bean;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import javax.persistence.*;

/**
 * @author luxx
 * @date 2018/5/18 0018
 */
@Data
@Entity
@Table
public class ChildTopic {

    @JSONField(name = "mainTopicId")
    @Column(name = "mainTopicId")
    private int mainTopicId;

    @Id
    @JSONField(name = "childTopicId")
    @Column(name = "childTopicId")
    private int childTopicId;

    @JSONField(name = "child_topic_name")
    @Column(name = "child_topic_name")
    private String childTopicName;

    public ChildTopic(int mainTopicId, int childTopicId, String childTopicName) {
        this.mainTopicId = mainTopicId;
        this.childTopicId = childTopicId;
        this.childTopicName = childTopicName;
    }

    public ChildTopic() {
    }
}
